package demo3;

public class TestException {
    public static void main(String[] args) {
        int[] array=null;
        try{
            System.out.println(array.length);
            System.out.println(array[10]);
        }catch (NullPointerException e){
            System.out.println(e.getMessage());
        }catch (ArrayIndexOutOfBoundsException e){
            e.printStackTrace();
        }finally {
            System.out.println("执行finally");
        }
        System.out.println("try_catch_finally之后的代码");
    }
}
